package com.bianguo.android.baidumapdemo.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.bianguo.android.baidumapdemo.R;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/3/2.
 */

public class InfoAdapter extends BaseRecyclerAdapter<String> {

    public InfoAdapter(Context mContext, ArrayList<String> list) {
        super(mContext, list);
    }

    @Override
    public BaseViewHolder createHolder(ViewGroup parent, int viewType) {
        View view = inflater.inflate(R.layout.item_info_layout, parent, false);
        return new ViewHolder(view);
    }

    @Override
    public void bindHolder(BaseViewHolder holder, int position) {
        ViewHolder viewHolder = (ViewHolder) holder;
        String info = list.get(position);
        viewHolder.infoTv.setText(info);
    }

    public static class ViewHolder extends BaseViewHolder {

        @BindView(R.id.item_info_text)
        TextView infoTv;

        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}
